/**
 * Copyright &copy; 2012-2016 <a href="https://github.com/thinkgem/jeesite">JeeSite</a> All rights reserved.
 */
package com.thinkgem.jeesite.modules.shop.entity.order;

import com.thinkgem.jeesite.modules.shop.entity.address.Address;
import com.thinkgem.jeesite.modules.shop.entity.goods.Goods;
import org.hibernate.validator.constraints.Length;
import com.thinkgem.jeesite.modules.sys.entity.User;

import com.thinkgem.jeesite.common.persistence.DataEntity;

/**
 * 订单信息Entity
 * @author 兰建斌
 * @version 2019-05-15
 */
public class Order extends DataEntity<Order> {
	
	private static final long serialVersionUID = 1L;
	private String sn;		// 订单编号
	private Goods goods;		// 商品ID
	private User user;		// 用户ID
	private String ordertype;		// 订单类型
	private Address address;		// 地址ID
	private String upateBy;		// 更新人

	public Order() {
		super();
	}

	public Order(String id){
		super(id);
	}

	@Length(min=0, max=255, message="订单编号长度必须介于 0 和 255 之间")
	public String getSn() {
		return sn;
	}

	public void setSn(String sn) {
		this.sn = sn;
	}

	public Goods getGoods() {
		return goods;
	}

	public void setGoods(Goods goods) {
		this.goods = goods;
	}

	public User getUser() {
		return user;
	}

	public void setUser(User user) {
		this.user = user;
	}
	
	@Length(min=0, max=255, message="订单类型长度必须介于 0 和 255 之间")
	public String getOrdertype() {
		return ordertype;
	}

	public void setOrdertype(String ordertype) {
		this.ordertype = ordertype;
	}
	

	public Address getAddress() {
		return address;
	}

	public void setAddress(Address address) {
		this.address = address;
	}
	
	@Length(min=1, max=64, message="更新人长度必须介于 1 和 64 之间")
	public String getUpateBy() {
		return upateBy;
	}

	public void setUpateBy(String upateBy) {
		this.upateBy = upateBy;
	}

}